home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
autofx
/
eot_lightning.ifx
< prev
next >
Wrap
Text File
|
2004-08-03
|
1KB
|
49 lines
/*
* EOT_Lightning.ifx
* Written by Thomas Krehbiel
*
* Lightning strike from top left to bottom right.
*
* Inputs:
* Word(Arg(1),1) = Frame number (1 - N)
* Word(Arg(1),2) = Main filename ("-" if not specified)
* Word(Arg(1),3) = Swap filename ("-" if not specified)
* Word(Arg(1),4) = Sequence number (?)
* Word(Arg(1),5) = Total number of frames (N)
*
* Returns:
* 0 if successful, non-zero on failure
*
*/
OPTIONS RESULTS
base = 'Autofx_Lightning_'
framenum = Word(Arg(1),1)
mainname = Word(Arg(1),2)
swapname = Word(Arg(1),3)
seqnum = Word(Arg(1),4)
framemax = Word(Arg(1),5)
GetMain
IF rc ~= 0 THEN EXIT rc
PARSE VAR result name width height .
x = (width-1) * framenum % framemax
y = (height-1) * framenum % framemax
d = (30 * framenum % framemax) - 15
GetMain
PARSE VAR result name wid ht .
/*rad = ((wid + ht) % 2) / 100
IF rad < 1.0 THEN rad = 1.0*/
outerglow = ((wid + ht) % 2) % 50
IF outerglow < 1 THEN outerglow = 1
Hook Lightning 0 0 0 x y 255 OGlowRad outerglow Deviation d Probability 0
EXIT